import request from '@/utils/request'

// 用户管理接口
export const getCouponsList = (page,limit,from) => {
    return request({
        url: '/api/coupons/'+page+"/"+limit,
        method: 'get',
        params:from
    })
}

export const getCouponsTypes = () =>{
    return request({
        url: '/api/types',
        method: 'get',
    })
}

export const getCouponsUpdateState = id =>{
    return request({
        url: '/api/updateCouponsState/'+id,
        method: 'get',
    })
}

export const getDeleteCoupons = id =>{
    return request({
        url: '/api/deleteCoupons/'+id,
        method: 'get',
    })
}

export const getDeleteCouponsUser = id =>{
    return request({
        url: '/api/deleteCouponsUser/'+id,
        method: 'get',
    })
}

export const addCouponsTypes = from =>{
    return request({
        url: '/api/addCouponsTypes',
        method: 'post',
        data:from
    })
}
export const getaddCoupons = from =>{
    return request({
        url: '/api/getaddCoupons',
        method: 'post',
        data:from
    })
}





